package co.yixiang.upms.common.logging.feign;


import co.yixiang.common.core.api.ApiResult;
import co.yixiang.common.core.constant.ServiceNameConstants;
import co.yixiang.upms.common.logging.domain.Log;
import co.yixiang.upms.common.logging.hystix.RemoteLoggingFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
 * 日志服务
 *
 * @author yshop
 */
@FeignClient(contextId = "remoteLoggingService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteLoggingFallbackFactory.class)
public interface RemoteLoggingService
{
    /**
     * 保存日志
     *
     * @return 结果
     */
    @PostMapping(value = "/logs/save")
    ApiResult save(@RequestBody Log map);
}
